home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1469 / effects.frm (.txt) < prev    next >
Visual Basic Form  |  1996-08-03  |  16KB  |  478 lines

  1. VERSION 4.00
  2. Begin VB.Form frmEffects 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "VBMax Electronic Message Demo - Special Effects"
  5.    ClientHeight    =   4125
  6.    ClientLeft      =   240
  7.    ClientTop       =   1695
  8.    ClientWidth     =   8700
  9.    Height          =   4530
  10.    Icon            =   "Effects.frx":0000
  11.    Left            =   180
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4125
  17.    ScaleWidth      =   8700
  18.    Top             =   1350
  19.    Width           =   8820
  20.    Begin VB.CommandButton cmdCancel 
  21.       Cancel          =   -1  'True
  22.       Caption         =   "&Close"
  23.       Height          =   495
  24.       Left            =   7140
  25.       TabIndex        =   43
  26.       Top             =   3300
  27.       Width           =   1395
  28.    End
  29.    Begin VB.Frame Frame1 
  30.       Caption         =   "Wipe from"
  31.       Height          =   3255
  32.       Index           =   4
  33.       Left            =   5280
  34.       TabIndex        =   28
  35.       Top             =   780
  36.       Width           =   1575
  37.       Begin VB.CommandButton cmdEffect 
  38.          Caption         =   "Top"
  39.          Height          =   315
  40.          Index           =   26
  41.          Left            =   120
  42.          TabIndex        =   29
  43.          Top             =   300
  44.          Width           =   1335
  45.       End
  46.       Begin VB.CommandButton cmdEffect 
  47.          Caption         =   "Right"
  48.          Height          =   315
  49.          Index           =   27
  50.          Left            =   120
  51.          TabIndex        =   30
  52.          Top             =   660
  53.          Width           =   1335
  54.       End
  55.       Begin VB.CommandButton cmdEffect 
  56.          Caption         =   "Bottom"
  57.          Height          =   315
  58.          Index           =   28
  59.          Left            =   120
  60.          TabIndex        =   31
  61.          Top             =   1020
  62.          Width           =   1335
  63.       End
  64.       Begin VB.CommandButton cmdEffect 
  65.          Caption         =   "Left"
  66.          Height          =   315
  67.          Index           =   29
  68.          Left            =   120
  69.          TabIndex        =   32
  70.          Top             =   1380
  71.          Width           =   1335
  72.       End
  73.       Begin VB.CommandButton cmdEffect 
  74.          Caption         =   "Top and Bottom"
  75.          Height          =   315
  76.          Index           =   30
  77.          Left            =   120
  78.          TabIndex        =   33
  79.          Top             =   1740
  80.          Width           =   1335
  81.       End
  82.       Begin VB.CommandButton cmdEffect 
  83.          Caption         =   "Left and Right"
  84.          Height          =   315
  85.          Index           =   31
  86.          Left            =   120
  87.          TabIndex        =   34
  88.          Top             =   2100
  89.          Width           =   1335
  90.       End
  91.       Begin VB.CommandButton cmdEffect 
  92.          Caption         =   "^ Center v"
  93.          Height          =   315
  94.          Index           =   32
  95.          Left            =   120
  96.          TabIndex        =   35
  97.          Top             =   2460
  98.          Width           =   1335
  99.       End
  100.       Begin VB.CommandButton cmdEffect 
  101.          Caption         =   "< Center >"
  102.          Height          =   315
  103.          Index           =   33
  104.          Left            =   120
  105.          TabIndex        =   36
  106.          Top             =   2820
  107.          Width           =   1335
  108.       End
  109.    End
  110.    Begin VB.Frame Frame1 
  111.       Caption         =   "Build from"
  112.       Height          =   3255
  113.       Index           =   3
  114.       Left            =   3540
  115.       TabIndex        =   19
  116.       Top             =   780
  117.       Width           =   1575
  118.       Begin VB.CommandButton cmdEffect 
  119.          Caption         =   "< Center >"
  120.          Height          =   315
  121.          Index           =   25
  122.          Left            =   120
  123.          TabIndex        =   27
  124.          Top             =   2820
  125.          Width           =   1335
  126.       End
  127.       Begin VB.CommandButton cmdEffect 
  128.          Caption         =   "^ Center v"
  129.          Height          =   315
  130.          Index           =   24
  131.          Left            =   120
  132.          TabIndex        =   26
  133.          Top             =   2460
  134.          Width           =   1335
  135.       End
  136.       Begin VB.CommandButton cmdEffect 
  137.          Caption         =   "Left and Right"
  138.          Height          =   315
  139.          Index           =   23
  140.          Left            =   120
  141.          TabIndex        =   25
  142.          Top             =   2100
  143.          Width           =   1335
  144.       End
  145.       Begin VB.CommandButton cmdEffect 
  146.          Caption         =   "Top and Bottom"
  147.          Height          =   315
  148.          Index           =   22
  149.          Left            =   120
  150.          TabIndex        =   22
  151.          Top             =   1020
  152.          Width           =   1335
  153.       End
  154.       Begin VB.CommandButton cmdEffect 
  155.          Caption         =   "Left"
  156.          Height          =   315
  157.          Index           =   21
  158.          Left            =   120
  159.          TabIndex        =   23
  160.          Top             =   1380
  161.          Width           =   1335
  162.       End
  163.       Begin VB.CommandButton cmdEffect 
  164.          Caption         =   "Bottom"
  165.          Height          =   315
  166.          Index           =   20
  167.          Left            =   120
  168.          TabIndex        =   21
  169.          Top             =   660
  170.          Width           =   1335
  171.       End
  172.       Begin VB.CommandButton cmdEffect 
  173.          Caption         =   "Right"
  174.          Height          =   315
  175.          Index           =   19
  176.          Left            =   120
  177.          TabIndex        =   24
  178.          Top             =   1740
  179.          Width           =   1335
  180.       End
  181.       Begin VB.CommandButton cmdEffect 
  182.          Caption         =   "Top"
  183.          Height          =   315
  184.          Index           =   18
  185.          Left            =   120
  186.          TabIndex        =   20
  187.          Top             =   300
  188.          Width           =   1335
  189.       End
  190.    End
  191.    Begin VB.CheckBox chkShowGrid 
  192.       Caption         =   "Show grid"
  193.       Height          =   315
  194.       Left            =   7140
  195.       TabIndex        =   42
  196.       Top             =   2760
  197.       Value           =   1  'Checked
  198.       Width           =   1215
  199.    End
  200.    Begin VB.Frame Frame1 
  201.       Caption         =   "Slide off to"
  202.       Height          =   3255
  203.       Index           =   2
  204.       Left            =   1800
  205.       TabIndex        =   10
  206.       Top             =   780
  207.       Width           =   1575
  208.       Begin VB.CommandButton cmdEffect 
  209.          Caption         =   "Top Left"
  210.          Height          =   315
  211.          Index           =   10
  212.          Left            =   120
  213.          TabIndex        =   11
  214.          Top             =   300
  215.          Width           =   1335
  216.       End
  217.       Begin VB.CommandButton cmdEffect 
  218.          Caption         =   "Top Center"
  219.          Height          =   315
  220.          Index           =   11
  221.          Left            =   120
  222.          TabIndex        =   12
  223.          Top             =   660
  224.          Width           =   1335
  225.       End
  226.       Begin VB.CommandButton cmdEffect 
  227.          Caption         =   "Top Right"
  228.          Height          =   315
  229.          Index           =   12
  230.          Left            =   120
  231.          TabIndex        =   13
  232.          Top             =   1020
  233.          Width           =   1335
  234.       End
  235.       Begin VB.CommandButton cmdEffect 
  236.          Caption         =   "Right"
  237.          Height          =   315
  238.          Index           =   13
  239.          Left            =   120
  240.          TabIndex        =   14
  241.          Top             =   1380
  242.          Width           =   1335
  243.       End
  244.       Begin VB.CommandButton cmdEffect 
  245.          Caption         =   "Bottom Right"
  246.          Height          =   315
  247.          Index           =   14
  248.          Left            =   120
  249.          TabIndex        =   15
  250.          Top             =   1740
  251.          Width           =   1335
  252.       End
  253.       Begin VB.CommandButton cmdEffect 
  254.          Caption         =   "Bottom Center"
  255.          Height          =   315
  256.          Index           =   15
  257.          Left            =   120
  258.          TabIndex        =   16
  259.          Top             =   2100
  260.          Width           =   1335
  261.       End
  262.       Begin VB.CommandButton cmdEffect 
  263.          Caption         =   "Bottom Left"
  264.          Height          =   315
  265.          Index           =   16
  266.          Left            =   120
  267.          TabIndex        =   17
  268.          Top             =   2460
  269.          Width           =   1335
  270.       End
  271.       Begin VB.CommandButton cmdEffect 
  272.          Caption         =   "Left"
  273.          Height          =   315
  274.          Index           =   17
  275.          Left            =   120
  276.          TabIndex        =   18
  277.          Top             =   2820
  278.          Width           =   1335
  279.       End
  280.    End
  281.    Begin VB.Frame Frame1 
  282.       Caption         =   "Slide on from"
  283.       Height          =   3255
  284.       Index           =   1
  285.       Left            =   60
  286.       TabIndex        =   1
  287.       Top             =   780
  288.       Width           =   1575
  289.       Begin VB.CommandButton cmdEffect 
  290.          Caption         =   "Left"
  291.          Height          =   315
  292.          Index           =   9
  293.          Left            =   120
  294.          TabIndex        =   9
  295.          Top             =   2820
  296.          Width           =   1335
  297.       End
  298.       Begin VB.CommandButton cmdEffect 
  299.          Caption         =   "Bottom Left"
  300.          Height          =   315
  301.          Index           =   8
  302.          Left            =   120
  303.          TabIndex        =   8
  304.          Top             =   2460
  305.          Width           =   1335
  306.       End
  307.       Begin VB.CommandButton cmdEffect 
  308.          Caption         =   "Bottom Center"
  309.          Height          =   315
  310.          Index           =   7
  311.          Left            =   120
  312.          TabIndex        =   7
  313.          Top             =   2100
  314.          Width           =   1335
  315.       End
  316.       Begin VB.CommandButton cmdEffect 
  317.          Caption         =   "Bottom Right"
  318.          Height          =   315
  319.          Index           =   6
  320.          Left            =   120
  321.          TabIndex        =   6
  322.          Top             =   1740
  323.          Width           =   1335
  324.       End
  325.       Begin VB.CommandButton cmdEffect 
  326.          Caption         =   "Right"
  327.          Height          =   315
  328.          Index           =   5
  329.          Left            =   120
  330.          TabIndex        =   5
  331.          Top             =   1380
  332.          Width           =   1275
  333.       End
  334.       Begin VB.CommandButton cmdEffect 
  335.          Caption         =   "Top Right"
  336.          Height          =   315
  337.          Index           =   4
  338.          Left            =   120
  339.          TabIndex        =   4
  340.          Top             =   1020
  341.          Width           =   1335
  342.       End
  343.       Begin VB.CommandButton cmdEffect 
  344.          Caption         =   "Top Center"
  345.          Height          =   315
  346.          Index           =   3
  347.          Left            =   120
  348.          TabIndex        =   3
  349.          Top             =   660
  350.          Width           =   1335
  351.       End
  352.       Begin VB.CommandButton cmdEffect 
  353.          Caption         =   "Top Left"
  354.          Height          =   315
  355.          Index           =   2
  356.          Left            =   120
  357.          TabIndex        =   2
  358.          Top             =   300
  359.          Width           =   1335
  360.       End
  361.    End
  362.    Begin VB.Frame Frame1 
  363.       Caption         =   "Other"
  364.       Height          =   1815
  365.       Index           =   0
  366.       Left            =   7020
  367.       TabIndex        =   37
  368.       Top             =   780
  369.       Width           =   1635
  370.       Begin VB.CommandButton cmdEffect 
  371.          Caption         =   "Flash"
  372.          Height          =   315
  373.          Index           =   34
  374.          Left            =   120
  375.          TabIndex        =   41
  376.          Top             =   1380
  377.          Width           =   1395
  378.       End
  379.       Begin VB.CommandButton cmdClear 
  380.          Caption         =   "Clear"
  381.          Height          =   315
  382.          Left            =   120
  383.          TabIndex        =   40
  384.          Top             =   1020
  385.          Width           =   1395
  386.       End
  387.       Begin VB.CommandButton cmdEffect 
  388.          Caption         =   "Static"
  389.          Height          =   315
  390.          Index           =   1
  391.          Left            =   120
  392.          TabIndex        =   39
  393.          Top             =   660
  394.          Width           =   1395
  395.       End
  396.       Begin VB.CommandButton cmdEffect 
  397.          Caption         =   "Continuous Scroll"
  398.          Height          =   315
  399.          Index           =   0
  400.          Left            =   120
  401.          TabIndex        =   38
  402.          Top             =   300
  403.          Width           =   1395
  404.       End
  405.    End
  406.    Begin VB.PictureBox picDisplay 
  407.       Height          =   510
  408.       Left            =   60
  409.       ScaleHeight     =   450
  410.       ScaleWidth      =   8565
  411.       TabIndex        =   0
  412.       Top             =   120
  413.       Width           =   8625
  414.    End
  415. Attribute VB_Name = "frmEffects"
  416. Attribute VB_Creatable = False
  417. Attribute VB_Exposed = False
  418. Option Explicit
  419. Const mcCAPTION = "VBMax: Visual Basic to the Max"
  420. Dim moEDisp As New CElectronicDisplay
  421. Private Sub Form_Load()
  422.     Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  423.     With moEDisp
  424.         .BackColor = &H800000
  425.         .ForeColor = &HFFFF&
  426.         .Interval = 20
  427.         .Effect = gnEFFECT_STATIC
  428.         Set .Container = picDisplay
  429.     End With
  430. End Sub
  431. Private Sub Form_Unload(Cancel As Integer)
  432.     moEDisp.Shutdown
  433.     Set moEDisp = Nothing
  434.     Set frmEffects = Nothing
  435. End Sub
  436. Private Sub cmdEffect_Click(Index As Integer)
  437. Dim lEndTime As Single
  438.     With moEDisp
  439.         Select Case Index
  440.             Case gnEFFECT_SCROLL
  441.                     .Interval = 20
  442.                     .Effect = Index
  443.                     .Caption = "Scrollin', scrollin', scrollin', keep them pixels rollin'...   "
  444.                                     
  445.             Case gnEFFECT_SLIDE_TO_TOP_LEFT To gnEFFECT_SLIDE_TO_LEFT, _
  446.                  gnEFFECT_WIPE_FROM_TOP To gnEFFECT_WIPE_TO_LEFT_AND_RIGHT
  447.                     .Effect = gnEFFECT_STATIC
  448.                     .Caption = mcCAPTION            'Display the message
  449.                     lEndTime = Timer() + 0.5
  450.                     Do Until Timer() >= lEndTime    'Pause for brain to register it
  451.                         DoEvents
  452.                     Loop
  453.                     .Effect = Index                 'Remove it using special effect
  454.                                     
  455.             Case gnEFFECT_FLASH
  456.                     .flashcount = 5
  457.                     .Effect = Index
  458.                     .Caption = mcCAPTION
  459.                     
  460.             Case Else
  461.                     .Cls
  462.                     .Effect = Index
  463.                     .Caption = mcCAPTION
  464.         End Select
  465.     End With
  466. End Sub
  467. Private Sub cmdClear_Click()
  468.     moEDisp.Cls
  469. End Sub
  470. Private Sub chkShowGrid_Click()
  471.     With moEDisp
  472.         .ShowGrid = Not .ShowGrid
  473.     End With
  474. End Sub
  475. Private Sub cmdCancel_Click()
  476.     Unload Me
  477. End Sub
  478.